

import pygame
from Base import Base

class Bullet(Base):

    def __init__(self,img,speed,planePosition):

        Base.__init__(self,img)

        self.reset(planePosition)

        self.speed = speed


    def move(self,planePosition):

        if self.rect.top< 0:
            self.reset(planePosition)
        else:
            self.rect.top-= self.speed

    def reset(self,planePosition):
        self.actived=True
        self.rect.left,self.rect.top= planePosition

# 正常子弹
class Bullect_normal(Bullet):
    def __init__(self,planePosition ):
        Bullet.__init__(self,"bullet1",12,planePosition)

# 超级子弹
class Bullect_super(Bullet):
    def __init__(self, planePosition):
        Bullet.__init__(self,"bullet2",15,planePosition)
        